<template>
	<view class="class-wrapper pageBg">
		<!-- 头部 -->
		<header-nav title="分类"></header-nav>
		<view class="class-box">
				<each-item v-for="item in classList" :item="item" :key="item._id"></each-item>
		</view>
	</view>
</template>

<script setup>
import { ref,onMounted } from 'vue';
import {apiGetClassify} from '@/api/index.js'

onMounted(()=>{
	getClassList()
})
const classList = ref([])
const getClassList = async()=>{
	let res = await apiGetClassify({pageSize:15})
	classList.value = res.data
}
</script>

<style lang="scss" scoped>
.class-wrapper{
	width: 100%;
	.class-box{
		width: 690rpx;
		margin: 0 auto;
		margin-bottom: 30rpx;
		display: grid;
		grid-template-columns: repeat(3,1fr);
		gap: 15rpx;
		padding-top: 30rpx;
	}
}
</style>
